// Copyright 2019-2025 PureStake Inc.
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Moonbeam is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_precompile_benchmarks`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `Ahmads-MBP`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024

// Executed Command:
// ./target/release/moonbeam
// benchmark
// pallet
// --steps=50
// --repeat=20
// --pallet=pallet_precompile_benchmarks
// --extrinsic=*
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=weights.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_precompile_benchmarks`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo<T> {
	/// Storage: `RelayStorageRoots::RelayStorageRoot` (r:1 w:0)
	/// Proof: `RelayStorageRoots::RelayStorageRoot` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[100, 2000]`.
	pub fn verify_entry(x: u32, keys: u32) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `110`
		//  Estimated: `3509`
		// Minimum execution time: 91_000_000 picoseconds.
		Weight::from_parts(99_000_000, 0)
			.saturating_add(Weight::from_parts(0, 3509))
			// Standard Error: 2_909
			.saturating_add(Weight::from_parts(814_439, 0).saturating_mul(x.into()))
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().reads(keys.into()))
	}
	/// Storage: `RelayStorageRoots::RelayStorageRootKeys` (r:1 w:0)
	/// Proof: `RelayStorageRoots::RelayStorageRootKeys` (`max_values`: Some(1), `max_size`: Some(41), added: 536, mode: `MaxEncodedLen`)
	pub fn latest_relay_block() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `146`
		//  Estimated: `1526`
		// Minimum execution time: 4_000_000 picoseconds.
		Weight::from_parts(5_000_000, 0)
			.saturating_add(Weight::from_parts(0, 1526))
			.saturating_add(T::DbWeight::get().reads(1))
	}
}
